// Copyright (C) 2009, Jackie Ng
// http://code.google.com/p/mgfdo, jumpinjackie@gmail.com
// 
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
// 
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
// Lesser General Public License for more details.
// 
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
// 
//
// See license.txt for more/additional licensing information

#ifndef MGGETCLASSNAMESCOMMAND_H
#define MGGETCLASSNAMESCOMMAND_H

#include "MgProvider.h"
#include "MgConnection.h"
#include "FdoCommonCommand.h"

class MgGetClassNames : public FdoCommonCommand<FdoIGetClassNames, MgConnection>
{
	typedef FdoCommonCommand<FdoIGetClassNames, MgConnection> Parent;

private:
	FdoString* mSchemaName;

public:
	MgGetClassNames(FdoIConnection* conn) : Parent(conn) { }
	~MgGetClassNames() { }

public:
    /// \brief
    /// Gets the name of the schema for the enumeration. This function is optional;
    /// if not specified, execution of the command will enumerate the classes in all schemas.
    /// 
    /// \return
    /// Returns the schema name
    /// 
	MG_API virtual FdoString* GetSchemaName() { return mSchemaName; }

    /// \brief
    /// Sets the name of the schema for the enumeration. This function is optional; if not
    /// specified execution of the command will enumerate the classes in all schemas.
    /// 
    /// \param value 
    /// Input the schema name
    /// 
    /// \return
    /// Returns nothing
    /// 
	MG_API virtual void SetSchemaName(FdoString* value) { mSchemaName = value; }

    /// \brief
    /// Executes the GetClassNames command and returns a 
    /// FdoStringCollection. If the specified schema name does not exist,
    /// the Execute method throws an exception.
    /// 
    /// \return
    /// Returns the string collection of the feature classes for the specified schema.
    MG_API virtual FdoStringCollection* Execute();
};

#endif